<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>日期对象扩展</title>
    <style>
        *{margin: 0;padding: 0;list-style-type: none;}
    </style>
</head>
<body>
    <div id="box"></div>
    <script>
        let date = new Date()
        console.log( date.toLocaleDateString() ); //年/月/日(用/隔开)
        console.log( date.toLocaleTimeString() ); //时：分：秒(用:隔开)
        console.log( date.toLocaleString() ); //年/月/日(用/隔开) 时：分：秒(用:隔开)
        /*
            日期对象
                月份是从0开始
        */
    </script>
</body>
</html>